
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

 enum EventName {
    READ_CONFIGS = "read-configs",
    HTTP_REQUEST = "http_request",
    CONN_WS = "conn_ws",
    WS_REQ_PB = "ws_req_pb",
    WS_CANCEL_CONFIRM = "ws_cancel_confirm",

    LOGIN_ERROR = "login_error",

    GREETING = 'greeting',
    GOODBYE = 'goodbye',
    FINISHED_WALK = 'finished-walk',
    START_BRAKING = 'start-braking',
    END_BRAKING = 'end-braking',
    SHOW_COIN = 'show-coin',
    GAME_START = 'game-start',
    GAME_OVER = 'game-over',
    NEW_LEVEL = 'new-level',
    SHOW_TALK = 'show-talk',
    SHOW_GUIDE = 'show-guide',
    UPDATE_PROGRESS = 'update-progress',
}

enum AudioSource {
    BACKGROUND = 'background',
    CLICK = 'click',
    CRASH = 'crash',
    GETMONEY = 'getMoney',
    INCAR = 'inCar',
    NEWORDER = 'newOrder',
    START = 'start',
    STOP = 'stop',
    TOOTING1 = 'tooting1',
    TOOTING2 = 'tooting2',
    WIN = 'win',
}

enum BOX_BTN_TYPE {
    toast = 0,             // 飘字，自动消失
    know = 1,              // 无按钮（任意点击关闭）close_fun有则执行
    confirm_no_close = 2,  // 双按钮（确定 取消）confirm_fun, cancel_fun, 无close_fun!!!
    confirm = 3,           // 三按钮（确定 取消 关闭）confirm_fun, cancel_fun, close_fun
    error = 4,             // 单按钮（确定）点击重新登录
    continue = 5,          // 单按钮（确定）continue_fun
}

var account_url = "http://192.168.1.238:5200/";    // 外网
var base_url = "http://60.163.129.223";
@ccclass('Constants')
export class Constants {
    public static EventName = EventName;
    public static AudioSource = AudioSource;
    public static BOX_BTN_TYPE = BOX_BTN_TYPE;

    public static game_connect_type = "ws";
    public static center_server_url = "server.cs.006666.wang:9900";
    public static ENCRYPT_KEY = "FI1R31ifr4v9SQxRKtIZ2nYjvjUUiips";
    public static account_login_url = account_url+"game-web/user/login";
    public static account_register_url = account_url + "game-web/user/register";
    public static account_selectgateway_url = account_url + "game-web/user/selectGateway";


}

globalThis.channelId = "a_hy_00";
globalThis.platform_type = 1;

